/* Global styles */
@import 'variables';
@import "../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins";
@import "../node_modules/font-awesome/scss/variables";

h2 {
  font-size: 28px;
  margin-top: 10px;
}

* {
  font-family: $font-family-base;
  font-weight: 400;
}

html, body {
  height: 100vh;
  width: 100%;
}

body {
  background: #efefef;
  overflow: hidden;
}

a {
  cursor: pointer;
}

a, div {
  &.disabled {
    pointer-events: none;
    cursor: default;
    color: #999 !important;
  }
}

button:focus {
  outline: 0 !important;
}

.btn {
  &:focus {
    outline: 0;
  }

  &.text-link{
    padding: 0 !important;
  }

  ~.btn{
    margin-left: 5px;
  }
}

.btn-round {
  width: $btn-width;
  height: $btn-width;
  border-radius: 50%;
}

.btn-brand {
  background: $brand-primary;
  border-color: #fff;
  color: white;

  &:hover {
    background: darken($brand-primary, 5%);
    color: white;
  }
}

.btn-danger {
  @include button-variant($brand-danger, $btn-default-bg, $btn-danger-border);
  transition: all 0.3s ease;

  &:hover {
    @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
  }
}

.clickable {
  cursor: pointer;
}

.padding-side-15 {
  padding-left: 15px;
  padding-right: 15px;
}

.divider {
  position: relative;
  display: flex;
  align-items: center;

  .title {
    display: flex;
    flex-grow: 1;
    &:before,
    &:after {
      content: "";
      position: relative;
      border-top: 1px solid #ccc;
      flex-grow: 1;
      margin: 9px 3px;
    }

    &:before {
      max-width: 10px;
    }
  }
}

.card {
  background: $light-white;
  padding: 10px 15px;
  box-shadow: 0 0 8px 0 #c8c8c8;
  margin: 0 15px 15px;
}

.fill-height {
  height: calc(100vh - 70px);
}

.cp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  grid-template-rows: repeat(auto-fit, minmax(200px, 1fr));
  grid-column-gap: 10px;
  grid-row-gap: 10px;
  list-style: none;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;

  @media (min-width: $screen-sm-max) and (max-width: $screen-lg-min) {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  @media (max-width: $screen-sm-max) {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

}

.grid-card {
  background: $light-white;
  width: 100%;
  height: 100%;
  box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  flex-shrink: 1;

  .image {
    flex-grow: 1;
    background: $light-white;
    width: inherit;
    height: inherit;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .no-img {
      height: inherit;
      display: flex;
      justify-content: center;
      align-items: center;
      background: $gray-lighter;
      color: $gray-light;
      font-size: 20px;
      min-height: 100px;
      flex-grow: 1;
    }
  }

  .description {
    padding: 10px;

    .title {
      font-size: 20px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    p{
      height: 4.2em;
      line-height: 1.4em;
      overflow: hidden;
      font-size: 0.8em;
      margin-bottom: 0;
      text-overflow: ellipsis;
    }
  }

  .actions {
    padding: 10px;
    .btn {
      padding: 0;
      text-transform: uppercase;
      color: $gray;
      text-decoration: none;

      &:hover {
        color: $brand-primary;
      }

      &:not(:last-child) {
        margin-right: 10px;
      }
    }
  }
}

.main {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  max-width: 1500px;
  margin: auto;
  box-shadow: $light-boxshadow;

  .flex-container {
    display: flex;
  }

  .routes {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: auto;
  }
}

body.native.desktop {
  opacity: 0;
  transition: opacity 0.5s ease;

  .native-bar {
    -webkit-app-region: drag;
    width: 100vw;
    position: fixed;
    z-index: 999;
  }

  .main {
    max-width: initial;
  }

  .sidebar {
    .cloud-player {
      display: none !important;
    }

    .menu {
      top: 0 !important;
    }
  }

  @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
    .sidebar {
      width: 80px;

      .menu {
        padding-left: 20px !important;
      }
    }
  }

  &.darwin {
    //background: transparent;

    .native-bar {
      height: 27px;
    }

    @media (min-width: $screen-md-min) {
      .routes {
        app-scroll-view {
          padding-top: 8px;
        }
      }

      .sidebar {
        .menu {
          padding-top: 20px;
        }
      }
    }

    @media (max-width: $screen-md-min) {
      .native-bar {
        .darwin-btns {
          width: 320px;
          height: 30px;
          position: absolute;
          left: 0;
          top: 0;
          overflow: hidden;
          &:after {
            content: '';
            position: absolute;
            width: 343px;
            box-shadow: 0px 0px 27px 27px rgba(0, 0, 0, 0.5);
            top: -16px;
            left: 0;
          }
        }
      }
    }
  }
}

.label + .label {
  margin-left: 5px;
}

.label {
  &.label-light {
    background: transparent;
    border: 1px solid;

    &.label-default {
      color: $gray-light;
    }

    &.label-primary {
      color: $brand-primary;
    }

    &.label-success {
      color: $brand-success;
    }

    &.label-danger {
      color: $brand-danger;
    }

    &.label-info {
      color: $brand-info;
    }

    &.label-warning {
      color: $brand-warning;
    }
  }
}

.scrollable {
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
  display: block;
  &::-webkit-scrollbar {
    display: none;
  }
}

.fa-queue,
.fa-add-playlist{
  position: relative;
  &:before {
    content: $fa-var-bars;
  }
  &:after {
    background: $light-white;
    position: absolute;
    top: 10%;
    right: 0;
    font-size: 54%;
    padding: 0 6% 6% 10%;
  }
}

.fa-queue{
  &:after {
    content: $fa-var-play;
  }
}

.fa-add-playlist{
  &:before {
    content: $fa-var-list-alt;
  }
  &:after {
    content: $fa-var-plus;
    top: -10%;
    right: -3px;
    font-size: 60%;
    border-radius: 50%;
  }
}

.btn-default{
  .fa-queue{
    &:after{
      background: $btn-default-bg;
    }
  }
  &:hover{
    .fa-queue{
      &:after{
        background:  darken($btn-default-bg, 10%);
      }
    }
  }
}

@media (min-width: $screen-lg-min) {
  .main {
    .routes {
      margin: 0;
      max-width: initial;
    }
  }
}
